import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Index from '../views/Index.vue'
import Dtime from '../testing/Dtime.vue'
import Swiper from '../testing/Swiper.vue'
// import Move from '../testing/Move.vue'
import Desc from '../views/Desc.vue'
import Area from '../views/Area.vue'

Vue.use(VueRouter)

const routes = [
  { 
 path: '/desc',
  component:Desc
},


  {
    path: '/endpage',
    name: 'Endpage',
    component: () => import('../views/Endpage'),
  },  

  {
    path: '/introduce',
    name: 'Introduce.vue',
    component: () => import('../views/Introduce'),
  },  
  {
    path: '/myinfo',
    name: 'MyInfo',
    component: () => import('../views/MyInfo'),
  },
  {
    path: '/modify',
    name: 'Modify',
    component: () => import('../views/Modify.vue'),
  }, 
  {
    path: '/ambition',
    name: 'ambition',
    component: () => import('../views/ambition.vue'),
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('../views/Login.vue'),
  },
  {
    path: '/detail',
    name: 'Detail',
    meta:{
      keepalive:false
    },
    props:true,
    component: () => import('../views/Detail.vue'),
  },
  {
    path: '/eventdetails',
    name: 'EventDetails',
    component: () => import('../views/EventDetails'),
  }, 
  {
    path: '/area',
    name: 'Area',
    meta:{
      keepalive:true
    },
    component:Area,
  },
  {
    path: '/testing',
    name: 'testing',
    component: () => import('../testing/Layout.vue'),
  },
  {
    path: '/register',
    name: 'Register',
    component: () => import('../views/Register'),
  },
  {
    path: '/mine',
    name: 'Mine',
    component: () => import('../views/Mine'),
  },
  {
    path: '/newsdetail',
    name: 'NewsDetail',
    component: () => import('../views/NewsDetail.vue'),
  },
  {
    path: '/volunteer',
    name: 'Volunteer',
    component: () => import('../views/Volunteer.vue'),
  },
  {
    path: '/news',
    name: 'News',
    component: () => import('../views/News.vue'),

  },
  
  {
    path: '/swiper',
    component:Swiper,
  },
  {
    path: '/dtime',
    component:Dtime,
  },
  {
    path: '/',
    name: 'Index',
    component:Index,
    meta:{
      keepAlive:false  
    }
  },
 
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
